<template>
	<div>
		<Table :where="where" :url="url" ref="Table" :col="6" :select="select" @selectChange="selectChange" :selectData="selectData">
			<!-- <div slot="hd-btn">
                    <el-button type="primary" @click="addUser">添加人员</el-button>
                </div> -->
			<el-table-column prop="id" label="id" align='center'>
			</el-table-column>
			<el-table-column prop="name" label="姓名" align='center'>
			</el-table-column>
			<el-table-column label="奖品类型" align='center'>
				<template slot-scope="scope">
					<span v-text="prizeTypeName[scope.row.prizeType]"></span>
				</template>
			</el-table-column>
			<el-table-column prop="rate_days" label="收益天数" align='center'>
			</el-table-column>
			<el-table-column prop="totalNum" label="总数" align='center'>
			</el-table-column>
			<el-table-column prop="sendNum" label="已发放数量" align='center'>
			</el-table-column>
			<el-table-column prop="c_by" label="创建人" align='center'>
			</el-table-column>
			<el-table-column prop="u_by" label="更新人" align='center'>
			</el-table-column>
			<el-table-column label="创建时间">
				<template slot-scope="scope">
					<i class="el-icon-time"></i>
					<span style="margin-left: 10px">{{ scope.row.create_time }}</span>
				</template>
			</el-table-column>
			<el-table-column label="更新时间" align='center'>
				<template slot-scope="scope">
					<i class="el-icon-time"></i>
					<span style="margin-left: 10px">{{ scope.row.update_time }}</span>
				</template>
			</el-table-column>
			<!-- <el-table-column label="操作" fixed="right" align='center'>
                <template slot-scope="scope">

                    <el-button size="mini" @click="edit(scope.row)">编辑</el-button>
                    <el-button size="mini" type="danger" @click="del(scope.row)">删除</el-button>
                </template>
            </el-table-column> -->
		</Table>
	</div>
</template>
<script>
import { platformWhere } from './form/self-built';
// import table from '../../../mixin/table';
export default {
	props: {
		select: {
			type: Boolean,
			default: false,
		},
		selectData: {
			type: Object,
			default() {
				return {};
			},
		},
	},
	data() {
		return {
			prizeTypeName: {
				21: '现金',
				22: '体验金',
				1: '加息劵',
				2: '折扣卷',
				4: '火箭卷',
				5: '提现劵',
			},
			url: '/admin/active/platformPize',
			formData: {
				userName: '', // 姓名
				workNumber: '', // 工号
				phone: '',
				passwd: '', // 密码
				checkPass: '',
				roleType: '',
			},
			roleTypeList: [],
			submitIng: false,
			useType: '',
			where: platformWhere,
			// selectData: {},
			// };
			// tableData: [],
		};
	},
	mounted() {},

	methods: {
		selectChange(data) {
			this.$emit('selectChange', data);
		},
	},
	watch: {
		selectData(val) {
			console.log(val, 'vals------vals');
		},
	},
};
</script>
